package com.cntcdt.api.service.impl;

import java.util.List;
import java.util.Map;

import com.cntcdt.api.db.dao.ChongdianbaoDao;
import com.cntcdt.api.db.model.ChongdianbaoModel;
import com.cntcdt.api.service.ChongdianbaoService;

public class ChongdianbaoServiceImpl implements ChongdianbaoService {

	@Override
	public Map<String, Integer> searchCnt() {
		return ChongdianbaoDao.getInstance().searchCnt();
	}

	@Override
	public List<ChongdianbaoModel> findByStorTime(int sortTime) {
		return ChongdianbaoDao.getInstance().findByStorTime(sortTime);
	}

	@Override
	public List<ChongdianbaoModel> findBySearchContent(String searchContent,int sortTime) {
		return ChongdianbaoDao.getInstance().findBySearchContent(searchContent,sortTime);
	}

	@Override
	public ChongdianbaoModel findById(int chongdianbaoId) {
		return ChongdianbaoDao.getInstance().findByPrimaryKey(chongdianbaoId);
	}

	@Override
	public boolean updateModel(ChongdianbaoModel chongdianbao) {
		return ChongdianbaoDao.getInstance().updateAny(chongdianbao);
	}

	@Override
	public List<ChongdianbaoModel> findByLostCDB(int sortTime) {
		return ChongdianbaoDao.getInstance().findByLostCDB(sortTime);
	}

	@Override
	public ChongdianbaoModel findByCDB(String cdb) {
		return ChongdianbaoDao.getInstance().findByCDB(cdb);
	}

	@Override
	public List<ChongdianbaoModel> findByLostCDBSearchContent(String searchContent,int sortTime) {
		return ChongdianbaoDao.getInstance().findByLostCDBSearchContent(searchContent,sortTime);
	}

	@Override
	public List<ChongdianbaoModel> findByDeviceId(int deviceId) {
		return ChongdianbaoDao.getInstance().findByDeviceId(deviceId);
	}

	@Override
	public int findByPriorityIs0(int deviceId) {
		return ChongdianbaoDao.getInstance().findByPriorityIs0(deviceId);
	}

	@Override
	public List<ChongdianbaoModel> findByRemoveBrokenPositionCDB(int sortTime) {
		// TODO Auto-generated method stub
		return ChongdianbaoDao.getInstance().findByRemoveBrokenPositionCDB(sortTime);
	}

	@Override
	public Map<String, Integer> brokenPositionCDBCnt() {
		// TODO Auto-generated method stub
		return ChongdianbaoDao.getInstance().brokenPositionCDBCnt();
	}

}
